"""
@Project ：HD_project 
@File    ：timeing.py
@IDE     ：PyCharm 
@Author  ：靓仔
@Date    ：2023/12/13 0013 9:00 
"""

import time


def timing_decorator(func):
    def wrapper(*args, **kwargs):
        start_time = time.time()
        result = func(*args, **kwargs)
        end_time = time.time()
        elapsed_time = end_time - start_time
        print(f"方法：{func.__name__} 耗时： {elapsed_time:.4f}s")
        return result

    return wrapper
